const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  //关闭eslint校验工具
  lintOnSave: false,
  //代理服务器解决跨域的配置代码
  devServer: {
    host:'127.0.0.1',
    port:8080,
    proxy: {
      //下面这种写法：可以代理多台服务器！！！！
      '/erha': {
        target: 'http://127.0.0.1:3000',
        // pathRewrite: { '^/erha': '/erha' },
      },
      '/api': {
        target: 'https://api.github.com',
        pathRewrite: { '^/api': '' },
      },
    },
  },
})
